package main

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"week04/internal/biz"
)

func main() {
	r := gin.Default()
	r.GET("/user", func(c *gin.Context) {
		//指定默认值
		id := c.DefaultQuery("id", "123")
		userInfo := biz.QueryUser(id)
		c.JSON(http.StatusOK, userInfo)
	})
	r.Run()
}
